package appconfig

import (
	"fmt"
	"github.com/spf13/viper"
)

type AppConfig struct {
	Mysql
}

type Mysql struct {
	User     string
	Password string
	Host     string
	Port     int
	Data     string
}

var ConfigData AppConfig

func Init() {

	viper.SetConfigFile("../appconfig/dev.yaml")

	viper.ReadInConfig()

	viper.Unmarshal(&ConfigData)
	fmt.Println(&ConfigData)
}
